package files;
import java.io.BufferedOutputStream;
import java.io.BufferedWriter;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.ObjectOutputStream;

import javax.swing.JTextField;

import commandes.Commande;


public class SaveCmdClient {

	ObjectOutputStream dos;

	public SaveCmdClient(Commande commande) {
		try {

			FileWriter file = new FileWriter("cmdClient.txt",true);
			BufferedWriter dos = new BufferedWriter(file);

			dos.write(commande.getBiere().getNom() +",");
			dos.write(commande.getQuantite() +"\r\n");
			dos.flush();
			dos.close();

		} catch (FileNotFoundException e) {

			e.printStackTrace();
		} catch (IOException e) {

			e.printStackTrace();
		}

	}
	
	
}